import http from '@/utils/httpRequest'

export default {
  getWechatLiveList (param) {
    return http.get(http.adornUrl('admin/wechatLive/list'), {
      params: param
    })
  },
  wechatLiveSave (param) {
    return http.post(http.adornUrl('admin/wechatLive/create'), param)
  },
  wechatLiveUpdate (param) {
    return http.put(http.adornUrl('admin/wechatLive/update'), param)
  },
  wechatLiveSync (id) {
    return http.get(http.adornUrl(`admin/wechatLive/synchro`))
  },
  wechatLiveAddProduct (param) {
    return http.put(http.adornUrl('admin/wechatLive/addProduct'), param)
  },
  wechatLiveDelete (id) {
    return http.delete(http.adornUrl(`admin/wechatLive/delete/${id}`))
  },
  wechatLiveInfo (id) {
    return http.get(http.adornUrl(`admin/wechatLive/info/${id}`))
  },
  getWechatLive4GoodsList (id) {
    return http.get(http.adornUrl(`admin/wechatLive/info/${id}`))
  },
  wechatLiveRemoveProductId (param) {
    return http.put(http.adornUrl('admin/wechatLive/removeProductId'), param)
  },
  getWechatLiveGoodsList (param) {
    return http.get(http.adornUrl('admin/wechatLiveGoods/list'), {
      params: param
    })
  },
  wechatLiveGoodsSave (param) {
    return http.post(http.adornUrl('admin/wechatLiveGoods/create'), param)
  },
  wechatLiveGoodsUpdate (param) {
    return http.put(http.adornUrl('admin/wechatLiveGoods/update'), param)
  },
  wechatLiveGoodsDelete (id) {
    return http.delete(http.adornUrl(`admin/wechatLiveGoods/delete/${id}`))
  },
  wechatLiveGoodsInfo (id) {
    return http.get(http.adornUrl(`admin/wechatLiveGoods/info/${id}`))
  },
  wechatLiveGoodsSync (param) {
    return http.post(http.adornUrl(`admin/wechatLiveGoods/synchro`), param)
  }
}
